package com.cn.genericity.binary;

/**
 * @author hels
 * @version 1.0
 * @date 2022/12/13 15:11
 * 参考学习文章地址：
 * https://blog.csdn.net/weixin_69417428/article/details/126839226?spm=1001.2101.3001.6650.1&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EAD_ESQUERY%7Eyljh-1-126839226-blog-126353632.pc_relevant_3mothn_strategy_and_data_recovery&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EAD_ESQUERY%7Eyljh-1-126839226-blog-126353632.pc_relevant_3mothn_strategy_and_data_recovery&utm_relevant_index=2
 */
public class MyNode extends Node {
    public MyNode(int value) {
        super(value);
    }

    public static void main(String[] args) {
        MyNode myNode = new MyNode(1);
        MyNode myNode2 = new MyNode(2);
        MyNode myNode3 = new MyNode(3);
        myNode.left = myNode2;
        myNode.right = myNode3;
        myNode2.right = new MyNode(4);

        Node<MyNode> myNode1 = new Node<MyNode>(3);
        System.out.println("===============");
        int[] arr = {2,3,4,6,7,8};
        // todo 转换类型失败
        MyNode mynode4 = myNode1.getNodeInstance(arr, myNode);
        /*MyNode head = MyNode.getNodeInstance(arr, new MyNode(-1));
        MyNode.printTree(head);*/
    }
}
